using System;

namespace ThirdLife.UI.WinForms
{
  public class RegistrationServices : IRegistrationUIModuleServices
  {
    #region IRegistrationUIModuleServices Members

    public void RegisterModule(IUIModule module)
    {
      throw new NotImplementedException();
    }

    public event EventHandler RegisterActionInMenu;
    public event RequestAddToMainScreenHandler RequestAddToMainScreen;
    public event EventHandler<CustomEventArgument<IMenuDefinition>> RequestAddMenu;
    public event EventHandler<CustomEventArgument<IMenuItemDefinition>> RequestAddMenuItem;

    public void AddToMainScreen(object control, object location)
    {
      RequestAddToMainScreen(control, location);
    }

    public void AddMenu(string menuName, int order)
    {
      RequestAddMenu(null,new CustomEventArgument<IMenuDefinition>(new MenuDefinition(menuName,order)));
    }

    public void AddMenuItem(string menuName, string menuItemName, int order, EventHandler handler)
    {
      RequestAddMenuItem(null, new CustomEventArgument<IMenuItemDefinition>(new MenuItemDefinition(menuName, menuItemName, order, handler)));
    }

    #endregion
  }
}